System, method, and computer program product for increasing a lifetime of a plurality of blocks of memory

ABSTRACT

A system, method, and computer program product are provided for increasing a lifetime of a plurality of blocks of memory. In operation, at least one factor that affects a lifetime of a plurality of blocks of memory is identified. Additionally, the plurality of blocks to write is selected, based on the at least one factor.

FIELD OF THE INVENTION

The present invention relates to memory, and more particularly to memoryhaving a finite lifetime.

BACKGROUND

Memory is one of the most limiting aspects of performance of modernenterprise computing systems. One limiting aspect of memory is the factthat many types of memory exhibit a limited lifetime. For example, alifetime of non-volatile memory such as flash is reduced each time it iserased and re-written. Over time and thousands of erasures andre-writes, such flash memory may become less and less reliable.

One common prior art technique for reducing the reduction of memorylifetime is wear leveling. Wear leveling allows for blocks within astorage device to be erased and written a roughly equal number of times.This avoids situations where one block is more frequently used, reachesan end of life, and must stop being used. This reduces the storagecapacity of the entire device. Although the storage devices may havespare blocks, the spare blocks are exhausted and a memory capacity ofdevice drops such that the storage device may not be used.

Memory vendors often guarantee a life expectancy of a certain percentageof memory. For example, a flash memory vendor may guarantee that after100,000 program and erase cycles (i.e. endurance), less than 1% ofblocks will be unusable based on exceeding error correctionrequirements. In this case, the error correction requirements may be setto correct a single bit error per 512 bytes for the flash device. Somerecently developed devices have a much lower endurance. These devicesrequire a much larger error correction requirement.

Furthermore, the lifetimes of memory blocks may vary. Consequently,using wear leveling, where a number of program erase cycles are leveled,a storage device may reach an end of life when only a specifiedpercentage blocks are bad (1% for example). However, most blocksincluded in the storage device may still be functional.

There is thus a need for addressing these and/or other issues associatedwith the prior art.

SUMMARY

A system, method, and computer program product are provided forincreasing a lifetime of a plurality of blocks of memory. In operation,at least one factor that affects a lifetime of a plurality of blocks ofmemory is identified. Additionally, the plurality of blocks to write isselected, based on the at least one factor.

DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a method for increasing a lifetime of a plurality of blocksof memory, in accordance with one embodiment.

FIG. 2 shows a technique for increasing a lifetime of a plurality ofblocks of memory, in accordance with another embodiment.

FIG. 3 shows a method for increasing a lifetime of a plurality of blocksof memory, in accordance with another embodiment.

FIG. 4 shows a method for writing data to different storage devicesbased on a write frequency, in accordance with one embodiment.

FIG. 5 illustrates an exemplary system in which the various architectureand/or functionality of the various previous embodiments may beimplemented.

DETAILED DESCRIPTION

FIG. 1 shows a method 100 for increasing a lifetime of a plurality ofblocks of memory, in accordance with one embodiment. As shown, at leastone factor that affects a lifetime of a plurality of blocks of memory isidentified. See operation 102. Additionally, the plurality of blocks towrite is selected, based on the at least one factor. See operation 104.

In the context of the present description, the lifetime of the memorymay include any duration during which the memory exhibits any desireddegree of usability. For example, in various embodiments, such lifetimemay include, but is certainly not limited to a desired lifetime, anactual lifetime, an estimated lifetime, etc. Further, the degree offusability may refer to any usability-related parameter such as apercentage of components (e.g. blocks, cells, etc.) that are stilloperational, a reliability of the memory or components thereof, and/orany other parameter for that matter.

Additionally, in various embodiments, the memory may include, but is notlimited to, mechanical storage devices (e.g. disk drives, etc.), solidstate storage devices (e.g. dynamic random access memory (DRAM), flashmemory, etc.), and/or any other storage device. In the case that thememory includes flash memory, the flash memory may include, but is notlimited to, single-level cell (SLC) devices, multi-level cell (MLC)devices, NOR flash memory, NAND flash memory, MLC NAND flash memory, SLCNAND flash memory, etc. In one embodiment, the nonvolatile memory devicemay include at least one of a single-bit per cell NOR flash memory, amulti-bit per cell NOR flash memory, a single-bit per cell NAND flashmemory, and a multi-bit per cell NAND flash memory.

Furthermore, in the context of the present description, the factor mayinclude any factor that may affect a lifetime of memory blocks eitherdirectly, or indirectly. For example, in various embodiments the factorsmay include, but are not limited to, a number of errors (e.g. detected,corrected, etc.) during a read operation involving at least one of theblocks of memory, a duration between a program operation and readoperation involving at least one of the blocks of memory, a number oftimes at least one of the blocks of memory is erased, a durationrequired to erase at least one of the blocks of memory, a durationrequired to program at least one of the blocks of memory, a number ofretries required to program at least one of the blocks of memory, anumber of intervening reads of a page of at least one of the blocks ofmemory, a number of intervening reads in a neighboring page, structureand organization of memory, and/or any other factors that meet the abovedefinition. As an option, a history of use of the blocks of memory maybe stored. In this case, the history of use may be utilized to determinethe factor.

More illustrative information will now be set forth regarding variousoptional architectures and features with which the foregoing frameworkmay or may not be implemented, per the desires of the user. It should bestrongly noted that the following information is set forth forillustrative purposes and should not be construed as limiting in anymanner. Any of the following features may be optionally incorporatedwith or without the exclusion of other features described.

FIG. 2 shows a technique 200 for increasing a lifetime of a plurality ofblocks of memory, in accordance with another embodiment. As an option,the present technique 200 may be implemented in the context of thedetails of FIG. 1. Of course, however, the technique 200 may beimplemented in any desired environment. It should also be noted that theaforementioned definitions may apply during the present description.

As shown, an endurance 202 of a plurality of memory blocks 204 may bemonitored. In this case, the bars in FIG. 2 represent the number ofwrites for a particular block 204. In the context of the presentdescription, the endurance 202 refers to the number of write and erasecycles for each memory block 204. Thus, the endurance 202 corresponds toa usage of the memory blocks 204. In one embodiment, the number ofwrites and/or erases may be monitored and logged.

By monitoring the number of writes of the blocks 204, it may bedetermined which blocks have been utilized more frequently. In oneembodiment, the monitoring may be used to determine whether the numberof writes for any of the blocks 204 has exceeded a threshold 206.Additionally, such monitoring may allow an equalization of the usagesuch that when the number of writes for certain blocks reach thethreshold 206, other blocks below the threshold 206 may be utilized forwrites. For example, an order on which blocks are written and recycledmay be changed to minimize any difference in endurance values betweenblocks.

In operation, at least one factor that affects a lifetime of theplurality of blocks of memory 204 may be identified and/or monitored. Aplurality of blocks to write may then be selected based on the at leastone factor. In various embodiments, there may be multiple factorsindicating a state of the blocks 204 from a lifetime perspective. In oneembodiment, the factor may include a number of corrected errorsassociated with each of the blocks 204. Such corrected errors maycorrespond to a reading of the data, for example.

In various cases, the factor may be impacted by a plurality of otherfactors. For example, the number of corrected errors may be impacted byhow much time has lapsed from a program operation to a read, and by howmany reads were executed. Additionally, a number of times a block iserased and programmed may also impact the number of errors corrected.

Of course, many other factors may also impact the number of errorscorrected. In various embodiments, the factors may correspond to aperiod of time of usage of the blocks 204, a frequency of writes, a rateof the operations, a total permitted number of the operations, and aduration of the lifetime, etc. Of course, such exemplary aspects are setforth for illustrative purposes only as the factor may correspond to anyaspect that may affect a life expectancy of a block of memory.

In one embodiment, a score may be utilized as to determine whether tochange the order of which the blocks 204 are written and recycled. Forexample, each block 204 may have a corresponding score function that isbased on at least one factor. The score function may be utilized todetermine a score for each of the blocks 204.

This score may be utilized to minimize a difference in values betweenscore functions of the blocks 204. As an option, the score may be basedon one factor that affects a lifetime of the blocks 204. As anotheroption, the score may be based on a plurality of factors that affect alifetime of the blocks 204.

For example, in the case of two memory blocks, one memory block may havea score over the threshold 206 and one may have a score below thethreshold 206. In this case, each of the scores may correspond to atleast one factor that affects the lifetime of the blocks. It should benoted that, the scores may correspond to any number of factors, as notedabove.

In one embodiment, the scores may be indicative of a value correspondingto at least one factor relating to a life expectancy of the blocks. Inthis case, the difference in the values may reflect a difference in alifetime expectancy of the blocks. Thus, the two blocks may beequalized.

In one embodiment, the equalization may include utilizing (e.g. writing)the block below the threshold 206 while the block that is above thethreshold 206 is not utilized. This may occur until a point when the twoblocks correspond to equal or near equal values. At that point, thethreshold 206 may be increased and either memory block may be utilized.

Initially all blocks 204 may be below the threshold 206. When a blockexceeds the threshold 206, it may be labeled, or otherwise identified asa block above the threshold 206. The blocks 204 under the threshold 206may then be utilized until they reach or exceed the threshold 206.

This may continue until all blocks 204 below the threshold 206 areexhausted. At this point, a new threshold may be set such that allexisting blocks 204 are below the new threshold. This may repeatthroughout the lifetime of the blocks 204.

As an option, a count percentage of free space may be utilized duringthe equalization the variation between the blocks 204, in order tominimize a total amount of blocks 204 that are erased and written.Additionally, various other techniques may be utilize to minimize atotal amount blocks that are erased and written in conjunction withequalizing the variation between the blocks (i.e. block reclamation).Furthermore, various other equalizing techniques may be utilized toequalize the variation between the blocks 204.

In one embodiment, multiple memory modules may be utilized in a system.In this case, the memory modules may include memory modules withdifferent lifetimes. As such, the total memory lifetime of the systemmay be up to the sum of the lifetime of the memories, as opposed tobeing limited to a memory module with the minimum lifetime.

In one embodiment, a lifetime estimator module may serve to receivecommands communicated to a controller of a system via a storage bus. Thelifetime estimator module may compute an estimated lifetime assumingthat the commands received through the bus were executed. In oneembodiment, the lifetime estimator may be utilized to monitor the numberof writes and/or other factors affecting the lifetime of the memoryblocks 204. Strictly as an option, the lifetime estimator module may beutilized to set the threshold 206.

Of course, the threshold 206 may be set using a variety of techniques.In one embodiment, the threshold 206 may be a pre-determined threshold.In another embodiment, the threshold 206 may be set dynamically. As anoption, the threshold may correlate directly to a lifetime (e.g.expected, desired, etc.) of a device associated with at least one of thememory blocks 206.

In one embodiment, an intra-storage device redundancy capability may beutilized for reducing cost and improving performance. In suchembodiment, data may be moved between the individual storage devices,based on any factor associated with a lifetime thereof. For instance, asituation may involve a first one of the storage devices including a setof data that is more frequently overwritten with respect to the data ofa second one of the storage devices. In such case, after threshold of atleast one factor associated with lifetime is exceeded, such data may bemoved from the first storage device to the second storage device, andhenceforth the first storage device or one or more blocks/modulesthereof may be used to store less-frequently written data or retiredfrom further use.

To this end, storage device lifetime may be distributed appropriately toavoid one storage device or a portion of a storage device from failingat a point in time that is vastly premature with respect to otherstorage devices of the group. Of course, the present technique may beapplied not only among different storage devices, but also portionsthereof. To this end, the lifetime of any memory components may bemanaged in such a manner.

FIG. 3 shows a method 300 for increasing a lifetime of a plurality ofblocks of memory, in accordance with another embodiment. As an option,the present method 300 may be implemented in the context of thefunctionality of FIGS. 1-2. Of course, however, the method 300 may becarried out in any desired environment. It should also be noted that theaforementioned definitions may apply during the present description.

As shown, a threshold is defined such that all blocks of memory arebelow the threshold. See operation 302. In one embodiment, the thresholdmay correspond to a usage of the blocks. For example, as blocks are useda value of usage associated with the blocks may approach the threshold.In another embodiment, the threshold may correspond to at least oneother factor associated with a life expectancy of the set of blocks.

For example, the threshold may correspond to a number of correctederrors for the blocks. In this case, as blocks are used a value thenumber of corrected errors associated with the blocks may approach thethreshold. Of course, the threshold may correspond to any number offactors affecting the lifetime of the blocks.

Once an initial threshold is identified which the blocks are below, itis determined whether a block needs to be reclaimed. See operation 304.For example, if factors indicate that a block or group of blocks isabove the threshold or have been used disproportionately to otherblocks, it may be determined that the block or blocks need to bereclaimed.

In the context of the present description, block reclaiming, which maybe triggered by garbage collection, read disturbs, scrubbing, number ofcorrected errors, or other event, refers to equalizing a variationbetween block, based on at least one factor. For example, in variousembodiments the block reclaiming may include equalizing a variationbetween the blocks based on a number of errors detected during aread/write, a number of errors corrected during a read/write, a lengthof time to erase a block, a length of time for a block to program, anumber of entries utilized during programming, a number of interveningreads of a page, a number of intervening reads in a neighboring page, anumber of erases and program cycles of a block, and/or any otherfactors.

If it is determined that a block needs to be reclaimed, blocks in ablock set below the threshold are allocated to be written. See operation306. For example, blocks below a threshold may be utilized in a memoryoperation as opposed to the block or blocks in a block set which isabove the threshold.

Once block(s) in a block set below the threshold are allocated to bewritten, it is then determined whether any blocks exceed the threshold.See operation 308. For example, the blocks in the block set below thethreshold may be written until it is determined that a block exceeds thethreshold.

If it is determined that a block has exceeded the threshold, the blockmay be placed into the set of blocks corresponding to blocks over thethreshold. See operation 310. If the block has not exceeded thethreshold, the block may remain in the block set below the threshold andmay continue to be utilized.

It is then determined whether all of the blocks below the threshold areexhausted. See operation 312. In other words, it is determined whetherall blocks in the set of blocks corresponding to blocks below thethreshold have been included in the set of blocks corresponding toblocks above the threshold.

If all blocks below the threshold have been exhausted, a new thresholdis set and all existing blocks are defined to be below the newthreshold. See operation 314. Once a new threshold has been set, it isagain determined whether blocks need to be reclaimed. As an option, thismay continue over the lifetime of the memory blocks.

It should be noted that the new and the initial thresholds may be setbased on various criteria. For example, the threshold may be set basedon an expected usage of the blocks. In one embodiment, the threshold maybe a pre-determined threshold. In another embodiment, the threshold maybe determined based on the memory block usage.

FIG. 4 shows a method 400 for writing data to different storage devicesbased on a write frequency, in accordance with one embodiment. As anoption, the present method 400 may be implemented in the context of thefunctionality and architecture of FIGS. 1-3. Of course, however, themethod 400 may be carried out in any desired environment. It should alsobe noted that the aforementioned definitions may apply during thepresent description.

As shown, a frequency in which data is written is identified. Seeoperation 402. Additionally, a plurality of storage devices of differenttypes are selected from to write the data, based on the frequency. Seeoperation 404.

In one embodiment, the selection may be based on a threshold. Forexample, if the frequency in which data is written exceeds a threshold,a certain storage device may be selected to write the data. As anoption, the different types of storage devices may include an SLC and anMLC device, an MLC and MLC with different endurance, SLC and DRAM, MLCand DRAM. Of course, in various other embodiments, the different typesof storage devices may include any number of devices, including avariety of different types of memory.

In another embodiment, at least two different types of memory may beintegrated in one device. For example, flash MLC and SLC memory may becombined on one device. As another example, two different types of flashMLC may be integrated in one device. In yet another example, a mix ofmemory types in one device may be determined programmatically. In onecase, a portion of the storage device associated with SLC flash memorymay be determined and a portion of the storage device associated withthe MLC flash memory may be determined.

As a specific example, it may be determined that data from a particularapplication or program is written with a high frequency. In this case,an SLC device may be selected to write the data. On the other hand, itmay be determined that data from a particular application or program, orparticular location of disk, or from particular access pattern arewritten with a low frequency. In this case, an MLC device may beselected to write the data. Of course, this is merely an example, as anynumber of devices may be selected based on the identified frequency.

In one embodiment, a lifetime estimator module may serve to receivecommands communicated to a controller of a system via a storage bus. Thelifetime estimator module may monitor a frequency as well as computingan estimated lifetime assuming that the command(s) received through thebus was executed. Of course, the frequency may be determined in avariety of ways and is not limited to being identified by the lifetimeestimator module.

It should be noted that, in various embodiments, the memory mentioned inthe foregoing embodiments may include a mechanical storage device (e.g.a disk drive including a SATA disk drive, a SAS disk drive, a fiberchannel disk drive, IDE disk drive, ATA disk drive, CE disk drive, USBdisk drive, smart card disk drive, MMC disk drive, etc.) and/or anon-mechanical storage device (e.g. semiconductor-based, etc.). Suchnon-mechanical memory may, for example, include volatile or non-volatilememory. In various embodiments, the nonvolatile memory device mayinclude flash memory (e.g. single-bit per cell NOR flash memory,multi-bit per cell NOR flash memory, single-bit per cell NAND flashmemory, multi-bit per cell NAND flash memory, multi-level and/ormulti-bit per cell NAND flash, large block flash memory, resistivememory, phase change memory, magnetic memory, etc). While variousexamples of memory are set forth herein, it should be noted that thevarious principles may be applied to any type of memory a lifetime forwhich may be reduced due to various operations being performed thereon.

FIG. 5 illustrates an exemplary system 500 in which the variousarchitecture and/or functionality of the various previous embodimentsmay be implemented. For example, the exemplary system 500 may representthe computer set forth in some of the previous embodiments. Still yet,the various apparatuses set forth above may even be a component of thesystem 500.

As shown, a system 500 is provided including at least one host processor501 which is connected to a communication bus 502. The system 500 alsoincludes a main memory 504. Control logic (software) and data are storedin the main memory 504 which may take the form of random access memory(RAM).

The system 500 may also include a graphics processor 506 and a display508, i.e. a computer monitor. The system 500 may also include asecondary storage 510. The secondary storage 510 includes, for example,a hard disk drive and/or a removable storage drive, representing afloppy disk drive, a magnetic tape drive, a compact disk drive, etc. Theremovable storage drive reads from and/or writes to a removable storagemodule in a well known manner.

Computer programs, or computer control logic algorithms, may be storedin the main memory 504 and/or the secondary storage 510. Such computerprograms, when executed, enable the system 500 to perform variousfunctions. Memory 504, storage 510 and/or any other storage are possibleexamples of computer-readable media.

In one embodiment, the architecture and/or functionality of the variousprevious figures may be implemented in the context of the host processor501, graphics processor 506, secondary storage 510, an integratedcircuit (not shown) that is capable of at least a portion of thecapabilities of both the host processor 501 and the graphics processor506, a chipset (i.e. a group of integrated circuits designed to work andbe sold as a module for performing related functions, etc.), and/or anyother integrated circuit for that matter.

Still yet, the architecture and/or functionality of the various previousfigures may be implemented in the context of a general computer system,a circuit board system, a game console system dedicated forentertainment purposes, an application-specific system and/or any otherdesired system. For example, the system 500 may take the form of adesktop computer, lap-top computer, and/or any other type of logic.Still yet, the system 500 may take the form of various other devicesincluding, but not limited to a personal digital assistant (PDA) device,a mobile phone device, a television, etc.

Further, while not shown, the system 500 may be coupled to a network[e.g. a telecommunications network, local area network (LAN), wirelessnetwork, wide area network (WAN) such as the Internet, peer-to-peernetwork, cable network, etc.] for communication purposes.

While various embodiments have been described above, it should beunderstood that they have been presented by way of example only, and notlimitation. Thus, the breadth and scope of a preferred embodiment shouldnot be limited by any of the above-described exemplary embodiments, butshould be defined only in accordance with the following claims and theirequivalents.

1. A method, comprising: identifying at least one factor that affects alifetime of a plurality of blocks of memory; and selecting which of theplurality of blocks to write, based on the at least one factor.
 2. Themethod of claim 1, wherein the at least one factor includes a number oferrors during a read operation involving at least one of the blocks ofmemory.
 3. The method of claim 2, wherein the errors are detectederrors.
 4. The method of claim 2, wherein the errors are correctederrors.
 5. The method of claim 1, wherein the at least one factorincludes a duration between a program operation and a read operationinvolving at least one of the blocks of memory.
 6. The method of claim1, wherein the at least one factor includes a number of times at leastone of the blocks of memory is erased.
 7. The method of claim 1, whereinthe at least one factor includes a duration required to erase at leastone of the blocks of memory.
 8. The method of claim 1, wherein the atleast one factor includes a duration required to program at least one ofthe blocks of memory.
 9. The method of claim 1, wherein the at least onefactor includes a number of retries required to program at least one ofthe blocks of memory.
 10. The method of claim 1, wherein the at leastone factor includes a number of intervening reads of a page of at leastone of the blocks of memory.
 11. The method of claim 1, wherein the atleast one factor includes a number of intervening reads in a neighboringpage.
 12. The method of claim 1, and further comprising calculating ascore, based on the at least one factor.
 13. The method of claim 12,wherein the selecting is based on the score.
 14. The method of claim 1,wherein the selecting is based on a plurality of the factors.
 15. Themethod of claim 1, wherein a first one of the blocks with a longerestimated lifetime is written before a second one of the blocks with ashorter estimated lifetime.
 16. The method of claim 15, wherein thesecond one of the blocks with the shorter estimated lifetime is above athreshold.
 17. The method of claim 16, wherein the first one of theblocks with the longer estimated lifetime is below a threshold.
 18. Themethod of claim 1, wherein the memory includes a mechanical storagedevice.
 19. The method of claim 1, wherein the memory includes avolatile memory device.
 20. The method of claim 1, wherein the memoryincludes a nonvolatile memory device.
 21. The method of claim 20,wherein the nonvolatile memory device includes at least one of asingle-bit per cell NOR flash memory, a multi-bit per cell NOR flashmemory, a single-bit per cell NAND flash memory, and a multi-bit percell NAND flash memory.
 22. The method of claim 1, further includingstoring a history of use of the plurality of blocks of memory.
 23. Acomputer program product embodied on a computer readable medium,comprising: computer code for identifying at least one factor thataffects a lifetime of a plurality of blocks of memory; and computer codefor selecting which of the plurality of blocks to write, based on the atleast one factor.
 24. An apparatus, comprising: logic for selectingwhich of a plurality of blocks to write, based on at least one factorthat affects a lifetime of the plurality of blocks of memory.
 25. Theapparatus of claim 24, wherein the logic is coupled between a system andthe memory.